package com.zzy.mccjt.entity.system;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Table;
import java.util.Date;

/**
 * description:
 *
 * @author zzy
 * @version 1.0
 * @date 2020/4/30
 */
@Table(name = "system_role_menu_relation")
@Data
public class SystemRoleMenuRelation {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "JDBC")
    private Long id;

    /**
     * 角色id
     */
    @Column(name = "role_id")
    private Long role_id;

    /**
     * 菜单ID
     */
    @Column(name = "menu_id")
    private Long menu_id;

    /**
     * 创建日期
     */
    @Column(name = "created_on")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdOn;

    /**
     * 修改日期
     */
    @Column(name = "modified_on")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifiedOn;

    /**
     * 创建人姓名
     */
    @Column(name = "created_name")
    private String createdName;

    /**
     * 修改人姓名
     */
    @Column(name = "modified_name")
    private String modifiedName;

    /**
     * 删除标志
     */
    @Column(name = "is_deleted")
    private Boolean isDeleted;
}
